<?php
/**
* Creates a facebook share link
*/
function smarty_modifier_facebook($image_id=0, $title='')
{
	$image_id = (int)$image_id;
	
	$gallery_url = GALLERY_URL;
	$opengraph_size_id = THUMBNAIL_OPENGRAPH_SIZE_ID;
	
	#$url = urlencode("{$gallery_url}/{$opengraph_size_id}/{$image_id}.jpg");
	$url = urlencode("{$gallery_url}/image.php?id={$image_id}");
	$title = urlencode($title);
	
	$facebook_share_url="http://www.facebook.com/sharer.php?u={$url}&amp;t={$title}";
	return $facebook_share_url;
}
?>